(1) Field of the Invention
The present invention generally relates to a control system for controlling an object at a constant state, and more particularly to a control system for controlling an object at a constant state which can be applied to a controller for controlling a motor so that a driving speed thereof is maintained at a constant value.
(2) Description of Related Art
Conventionally, an integral-type optimal regulator for accurately controlling a driving speed of a motor and the like has been proposed. The integral-type optimal regulator is disclosed, for example, in Japanese Patent Laid Open No. 1-240903. In the conventional integral-type optimal regulator, no response calculation of status variables is carried out after obtaining solutions for determining weighting of a performance function. The weighting of the performance function is determined after rough weighting is selected so as to be equal to a solution obtained in accordance with a PI-control. According to the above process, a selection standard used for determining the weighting of the performance function when the resolution of an optimal regulator is obtained becomes clear, so that a time required for determining the weighting of the performance function can be decreased.
A description will now be given of a controller for controlling a driving speed of a motor, the controller using the above integral-type optimal regulator with reference to FIGS. 1 through 6.
Referring to FIG. 1, which shows a system for controlling a motor which drives a carriage of an image scanner, the system has a microcomputer unit 21 including a microprocessor 22, a read only memory 23 (ROM) and a random access memory 24 (RAM). The system further includes an instruction generating circuit 25, a driving interface circuit 26, a driving circuit 27, a motor 28, an incremental-encoder 29, an interface circuit 30 and a carriage 31 of the image scanner. The microprocessor 22, the read only memory 23 and the random access memory 24 in the microcomputer unit 21 are respectively connected to each other by a bus 35.
The instruction generating circuit 25 outputs a speed instruction signal denoting a speed at which the motor 28 should be controlled. The speed instruction signal output from the instruction generating circuit 25 is supplied via the bus 35 to the microcomputer unit 21. The incremental encoder 29 outputs pulses in synchronism with a rotation of the motor 28. The interface circuit 30 has a counter which is operated based on the pulses output from the incremental encoder 29. The driving interface circuit 26 converts calculation results obtained by the microcomputer unit 21 into a pulse-shaped control signal. The driving circuit 27 has a power device, such as a power transistor, and the power device is driven in accordance with the pulse-shaped control signal supplied from the driving interface circuit 26, so that the driving circuit 27 controls an applied voltage to the motor 28 based on the pulse-shaped control signal. The motor 28 is driven by the driving circuit 27 so as to be maintained at a predetermined driving speed. The driving speed of the motor 28 is detected by the incremental-encoder 29 and the interface circuit 30. The detected driving speed is supplied via the bus 35 to the microcomputer unit 21. The motor 28 is coupled to the carriage of the image scanner so that the carriage is moved at a predetermined speed.
The microcomputer unit 21 can be formed in one chip which also includes the instruction generating circuit 25, the driving interface circuit 26 and the interface circuit 30.
The microcomputer unit 21 has a function of the integral-type optimal regulator. A description will now be given of the function of the integral-type optimal regulator.
Since a self-inductance L of a direct-current motor is generally small, the self-inductance L can be ignored in a state equation which represents a state of the direct-current motor. Thus, the state equation can be denoted as follows. EQU .omega.=-[KT.sup.2 /(Ra.multidot.I.sub.n)].omega.+[KT/(Ra.multidot.I.sub.n)]u(1)
where .omega. is an angular speed of the motor, .omega. is an angular acceleration of the motor, KT is a torque constant of the motor, I.sub.n is inertia of the motor and a load of the motor, u is an input voltage of the motor, and Ra is a resistance of the armature of the motor.
An output equation is denoted by the following formula (2). EQU y=c.multidot..omega. (2)
where c is a constant.
In a discrete system, the state equation can be denoted by the following formula (3), EQU .omega.(k+1)=p.multidot..omega.(k)+q.multidot.u(k) (3)
and the output equation can be denoted by the following formula (4). EQU y(k)=c.multidot..omega.(k) (4)
In the above formula (3), p and q are constants determined based on the sampling period.
FIG. 2 shows function blocks of the integral-type optimal regulator system. Referring to FIG. 2, the integral-type optimal regulator has operation parts 41 and 44, an integration part 42, a first feed-back gain part 43 (K0), a motor block 45, feed-back loops 46 and 47, a second feed-back gain part 48 (K1) and a constant part 49. The operation part 41 calculates a difference e(k) between an object value R(k) and a controlled value y(k). The integration part 42 successively integrates differences e(k) output from the operation part 41. The integrated value obtained by the integration part 42 is multiplied by a feed-back gain K0 in the first feed-back gain part 43. A state of the motor 45 is described by the state equation indicated by the formula (3). The angular speed .omega.(k) obtained by the motor block 45 is multiplied by a constant c in the constant part 49 so that the controlled value y(k) is fed back via the feed-back loop 47 to the operation part 41. The angular speed .omega. (k) is also multiplied by a feed-back gain K1 in the second feed-back gain part 48 so that a value obtained by the multiplication in the second feed-back gain part 48 is fed back via the feed-back loop 46 to the operation part 44. The operation part 44 calculates a difference between the output of the first feed-back gain part 43 and the output of the second feed-back back gain part 48 so that a control signal u(k) is supplied from the operation part 4 to the motor block 45. As a result, the motor 28 is controlled at a predetermined speed in the motor block 45.
The object value R(k) corresponds to a speed at which the motor 28 should be controlled and is determined based on the speed instruction signal output from the instruction generating circuit 25 shown in FIG. 1. The controlled value y(k) corresponds to the driving speed of the motor 28 which is detected by the incremental-encoder 29 and the interface circuit 30. A process for detecting the driving speed of the motor 28 will be described later. K0 set in the first feed-back gain part 43 and K1 set in the second feed-back gain part 48 are respectively optimal gain vectors determined based on the solution of the Riccati equation.
A description will now be given of a process for obtaining the optimal gain vectors.
The following state equation (5) is made based on the above formulas (3) and (4). ##EQU1## where s(k)=.omega.(k)-.omega.(k-1), and d(k)=u(k)-u(k-1). When P.sub.1 and Q.sub.1 are respectively set as follows, ##EQU2## the performance function J regarding a control of the motor 28 is obtained as follows. ##EQU3## where W is a weighting coefficient and does not have a negative value. A control input d(k) is calculated so that the above performance function J is minimized.
The Riccati equation is described by the following formula (9). ##EQU4##
When a steady-state solution of the Riccati equation (9) is defined as H, the optimal gain vector G=(K0,K1) can be obtained by the following formula (10); EQU G=(W+Q.sub.1 '.multidot.H(k).multidot.Q.sub.1).sup.-1 .multidot.Q.sub.1 '.multidot.H.multidot.P.sub.1 ( 10)
where P.sub.1 ' and Q.sub.1 ' are respectively transposes of matrixes of P.sub.1 and Q.sub.1, and ( ).sup.-1 denotes an inverse matrix.
A description will now be given of a process for detecting a speed based on an output of the incremental-encoder 29. The process is carried out in the interface circuit 30 shown in FIG. 1.
The interface circuit 30 uses each pulse output from the incremental-encoder 29 as an interruption signal sent to the microcomputer unit 21. The interface circuit 30 has a counter for counting a reference clock signal. The pulses (OB) output from the incremental-encoder 29 and the reference clock signal (CLK) are respectively shown in FIG. 3. The counter provided in the interface circuit 30 decrements a count value from an initial value (e.g. 0FFFFH) in synchronism with the reference clock signal (CLK). When the interrupt signal is supplied to the microcomputer unit 21 at an edge 50 of one of the pulses (OB) output from the incremental-encoder 29, an interrupt routine shown in FIG.4 is carried out in the microcomputer unit 21. Referring to FIG.4, the count value which has been set in the counter in the cycle T.sub.n-1 is latched in a storage register provided in the interface circuit 30, in step 1. The count value latched in the storage register in the cycle T.sub.n-1 is stored in the random access memory 24 shown in FIG. 1, in step 2. Then the counter is initialized to the initial value (0FFFFH) and decrements the count value in synchronism with the reference clock signal (CLK) in the next cycle T.sub.n, in step 3. One interruption process in the microcomputer unit 21 is finished after the counter starts to decrement the count value in step 3. When the interrupt signal is supplied again to the microcomputer unit 21 at an edge 51 of one of the pulses output from the incremental-encoder 29, the next interruption process in the next cycle T.sub.n+1 is carried out in accordance with the flow chart (the steps 1 through 3) shown in FIG. 4. Then the above interruption process is repeatedly carried out at every edge of the pulses output from the incremental-encoder 29.
While the above interruption process is being repeatedly carried out, the angular speed .omega.(k) is calculated in accordance with the following formula (11); EQU .omega.(k)=[K/(T.sub.CLK .multidot.NE)].multidot.(1/n) (11)
where T.sub.CLK is a period of the reference clock signal (CLK), NE is a number of the divisions in the incremental-encoder 29, n is a count value in the counter [=(initial count value 0FFFFH)-(decremented count value)], and K is a unit conversion constant of the angular speed.
In the above integral-type optimal regulator, the difference e(k) between the object value R(k) and the controlled value y(k) is integrated (x.sub.o) to rapidly make the difference decrease to zero. Thus, the difference e(k) in an initial state in which the speed of the motor 28 starts to increase from zero is very large in comparison with that in a steady state in which the motor 28 is steadily driven at a predetermined speed, as shown in FIG. 5. As a result, a large overshoot of the speed is generated when driving of the motor 28 is started, as shown in FIG. 6. In FIG. 5, the difference e(k) reaches the maximum value at a time A. In FIG. 6, overshoot is generated so that the angular speed exceeds the object value at the time A. In FIGS. 5 and 6, after the overshoot is smoothed, the motor is steadily controlled. When the gains K0 and K1 are respectively increased to improve the responsiveness of the system, overshoot is noticeably generated. Thus, conventionally, the gains are set at low values to decrease the overshoot, so that the responsiveness of the system deteriorates.
The system having the above problem is limited to the integral-type optimal regulator. However, general integral-type regulator systems have the same problem.
In addition, while the motor 28 is being driven, a temperature of a coil of the motor is increased so that the resistance Ra of the armature is varied. When the resistance Ra of the armature is varied, coefficients [-KT.sup.2 /(Ra.multidot.I.sub.n)] and [KT/(Ra.multidot.I.sub.n)] in the state equation (1) are respectively varied. In this case, as coefficients in the Riccati equation (9) are also varied, the gains in the regulator differ from the optimal values. Thus, when the motor 28 is controlled by use of the gains obtained before the motor 28 is driven, accurate control of the motor 28 cannot be carried out.